/*
 * @Copyright: 2016 www.yyfax.com Inc. All rights reserved.
 */
package com.yyfax.pay.order.data.dao;

import com.yyfax.framework.dao.BaseDao;
import com.yyfax.pay.order.model.po.NotifyTaskPO;

/**
 * 异步通知任务,用于异步通知业务模块持久化接口
 *
 * @author buyi
 * @date 2017-04-12 11:09:15
 * @since 1.0.0
 */
public interface NotifyTaskDao extends BaseDao<NotifyTaskPO, Integer> {

	/**
	 * 根据主键获取实体
	 * 
	 * @user jiangmy
	 * @date 2017-04-12 11:09:15
	 * @since 1.0.0
	 * @param id 自增主键
	 * @param merchantCode 商户编号(为分表预留参数)
	 * @return
	 */
	public NotifyTaskPO selectByIdAndMerchantCode(int id, String merchantCode) throws Exception;

	/**
	 * 更新异步通知调度内容
	 * 
	 * @user buyi
	 * @date 2017-04-12 11:09:15
	 * @since 1.0.0
	 * @param id 自增主键
	 * @param merchantCode 商户编号(为分表预留参数)
	 * @return
	 */
	public int updateByMerchantAndOrderId(NotifyTaskPO task);

	/**
	 * 更新异步通知调度频次
	 * 
	 * @author buyi
	 * @date 2018-05-25 21:02:32
	 * @since v1.0.0
	 * @param task
	 * @return
	 */
	public int updateState(NotifyTaskPO task);
}
